import './assets/main.css'

import { createApp } from 'vue'
import App from './App.vue'
import GlobalCom from './components/GlobalCom.vue'
import router from './router'
import store from './store'

//
import axios from 'axios'
import VueAxios from 'vue-axios'

axios.interceptors.request.use((congig)=>{
    console.log('config',config);
    congig.headers.test = "test11"
    return config
},function (error){
console.log(error);
})

axios.interceptors.response.use((response) =>{
    console.log('response',response);
    if (response.status === 200){
        return response.data
    }else {
        //...
    }
})




const app = createApp(App)

// 注册全局组件
app.component(GlobalCom.name, GlobalCom)

//注册路由
app.use(router)

// 注册路由
app.use(store)


app.mount('#app')

app.use(VueAxios, axios)
